package de.fhwf.mixedreality.agent;

import de.fhwf.mixedreality.client.AgentView;
import de.fhwf.mixedreality.client.IClient;
import de.fhwf.mixedreality.client.IClient.Team;
import de.fhwf.mixedreality.client.Vector;

public class FieldBot extends SuperBot {

	public FieldBot(String server, ServerType type, Team team, int vtID,
			int rcID, String botName, String teamName, boolean simulationMode) {
		super(server, type, team, vtID, rcID, botName, teamName, simulationMode);
	}

	@Override
	public boolean process(IClient client, AgentView view) {			
			
			Vector ballPosition = client.getPositions().ball();
		
			if (ballPosition != null) {
				if (client.getMovements().canKick()) {
					dribbleToGoal();					
				} else {
					view.drawVectorFromVector(client.getPositions().me(), ballPosition);
					moveToNearBall();
				}
			}
			

		return true;
	}

	@Override
	public void terminate(IClient client) {
		// TODO Auto-generated method stub

	}

}
